﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SEMS.Models;
using SEMS.DAL;

namespace SEMS.BLL
{
    public class AdministraterBS
    {
        /// <summary>
        /// 验证管理员用户名密码
        /// </summary>
        /// <returns></returns>
        static public bool IsValid(string uid, string pwd)
        {
            using (var db = new SEMSDBContext())
            {
                return db.Administrater.Any(x => x.admin_id == uid && x.admin_pwd == pwd);
            }
        }
    }
}